package abstractClass;

public class Test {
    public static void main(String[] args) {
        Animal dog = new Dog();
        Animal cat = new Cat();
        run(dog);
        shout(dog);
        rest(dog);
        run(cat);
        shout(cat);
        rest(cat);
    }


    static void rest(Animal animal){
        animal.rest();
    }

    static void run(Animal animal){
        animal.run();
    }

    static void shout(Animal animal){
        animal.shout();
    }
}